<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <base data-ice="baseUrl" href="../../../">
  <title data-ice="title">Dao | API Document</title>
  <link type="text/css" rel="stylesheet" href="css/style.css">
  <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css">
  <script src="script/prettify/prettify.js"></script>
  
  
  <script src="script/manual.js"></script>
</head>
<body class="layout-container" data-ice="rootContainer">

<header>
  <a href="./">Home</a>
  
  <a href="identifiers.html">Reference</a>
  <a href="source.html">Source</a>
  
  <a data-ice="repoURL" href="https://git.oschina.net/kinuxroot/unique-model.js.git">Repository</a>
  <div class="search-box">
  <span>
    <img src="./image/search.png">
    <span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span>
  </span>
    <ul class="search-result"></ul>
  </div>
</header>

<nav class="navigation" data-ice="nav"><div>
  <ul>
    
  <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/session.js~Session.html">Session</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createSession">createSession</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-enablePersist">enablePersist</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-isPersistEnabled">isPersistEnabled</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-BaseModel">BaseModel</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-Types">Types</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-model">model</a></span></span></li>
<li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">backend</div><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html">Dao</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/backend/base.js~Session.html">Session</a></span></span></li>
<li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">model</div><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/model/base.js~Model.html">Model</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-createModel">createModel</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-getModel">getModel</a></span></span></li>
<li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">type</div><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/type/index.js~BaseType.html">BaseType</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/type/index.js~Double.html">Double</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/type/index.js~Integer.html">Integer</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/type/index.js~Text.html">Text</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/lib/type/index.js~UObject.html">UObject</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-defineType">defineType</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#static-function-toUniqueModel">toUniqueModel</a></span></span></li>
<li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-allTypes">allTypes</a></span></span></li>
</ul>
</div>
</nav>

<div class="content" data-ice="content"><div class="header-notice">
  <div data-ice="importPath" class="import-path"><pre class="prettyprint"><code data-ice="importPathCode"></code></pre></div>
  <span data-ice="access">public</span>
  <span data-ice="kind">class</span>
  
  
  
  <span data-ice="source">| <span><a href="file/lib/backend/base.js.html#lineNumber17">source</a></span></span>
</div>

<div class="self-detail detail">
  <h1 data-ice="name">Dao</h1>

  

  
  
  
  
  
  
  
  
  

  
  
  <div class="description" data-ice="description"><p>The base class of backend data access object.</p>
</div>

  

  

  

  
</div>



<div data-ice="constructorSummary"><h2>Constructor Summary</h2><table class="summary" data-ice="summary">
  <thead><tr><td data-ice="title" colspan="3">Public Constructor</td></tr></thead>
  <tbody>
  
  <tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-constructor-constructor">constructor</a></span></span><span data-ice="signature">(session: <span>backend/base/Session</span>)</span>
        </p>
      </div>
      <div>
        
        
        <div data-ice="description"><p>The constructor of Dao class</p>
</div>
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
</tbody>
</table>
</div>
<div data-ice="memberSummary"><h2>Member Summary</h2><table class="summary" data-ice="summary">
  <thead><tr><td data-ice="title" colspan="3">Public Members</td></tr></thead>
  <tbody>
  
  <tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-member-session">session</a></span></span><span data-ice="signature">: <span>*</span></span>
        </p>
      </div>
      <div>
        
        
        
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
</tbody>
</table>
</div>
<div data-ice="methodSummary"><h2>Method Summary</h2><table class="summary" data-ice="summary">
  <thead><tr><td data-ice="title" colspan="3">Public Methods</td></tr></thead>
  <tbody>
  
  <tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-create">create</a></span></span><span data-ice="signature">(uniqueModelObject: <span>model/base/Model</span>): <span>model/base/Model</span></span>
        </p>
      </div>
      <div>
        
        
        <div data-ice="description"><p>Create the UniqueModel object and persist it through backend.</p>
</div>
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-createAsync">createAsync</a></span></span><span data-ice="signature">(backendModel: <span>*</span>, callback: <span>*</span>)</span>
        </p>
      </div>
      <div>
        
        
        
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-execute">execute</a></span></span><span data-ice="signature">(operation: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></span>): <span>*</span></span>
        </p>
      </div>
      <div>
        
        
        <div data-ice="description"><p>Execute the asynchronous operation of backend model object.</p>
</div>
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-find">find</a></span></span><span data-ice="signature">(condition: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>): <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span></span>
        </p>
      </div>
      <div>
        
        
        <div data-ice="description"><p>Find the objects by condition.</p>
</div>
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-findAsync">findAsync</a></span></span><span data-ice="signature">(condition: <span>*</span>, callback: <span>*</span>)</span>
        </p>
      </div>
      <div>
        
        
        
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-findOne">findOne</a></span></span><span data-ice="signature">(condition: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>): <span>model/base/Model</span></span>
        </p>
      </div>
      <div>
        
        
        <div data-ice="description"><p>Find one object by condition.</p>
</div>
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-findOneAsync">findOneAsync</a></span></span><span data-ice="signature">(condition: <span>*</span>, callback: <span>*</span>)</span>
        </p>
      </div>
      <div>
        
        
        
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-getObjectId">getObjectId</a></span></span><span data-ice="signature">(backendModelObject: <span>*</span>): <span>*</span></span>
        </p>
      </div>
      <div>
        
        
        
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-getObjectIdKey">getObjectIdKey</a></span></span><span data-ice="signature">(): <span>*</span></span>
        </p>
      </div>
      <div>
        
        
        
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-refresh">refresh</a></span></span><span data-ice="signature">(uniqueModelObject: <span>model/base/Model</span>): <span>model/base/Model</span></span>
        </p>
      </div>
      <div>
        
        
        <div data-ice="description"><p>Refresh the persisted UniqueModel object.</p>
</div>
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-remove">remove</a></span></span><span data-ice="signature">(condition: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>): <span>*</span></span>
        </p>
      </div>
      <div>
        
        
        <div data-ice="description"><p>Remove some objects.</p>
</div>
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-removeAsync">removeAsync</a></span></span><span data-ice="signature">(condition: <span>*</span>, callback: <span>*</span>)</span>
        </p>
      </div>
      <div>
        
        
        
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-toBackendModel">toBackendModel</a></span></span><span data-ice="signature">(uniqueModelObject: <span>model/base/Model</span>): <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></span>
        </p>
      </div>
      <div>
        
        
        <div data-ice="description"><p>Convert the UniqueModel object to BackendModel object.</p>
</div>
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-toUniqueModel">toUniqueModel</a></span></span><span data-ice="signature">(backendModelObject: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>, uniqueModelObject: <span>model/base/Model</span>): <span>model/base/Model</span></span>
        </p>
      </div>
      <div>
        
        
        <div data-ice="description"><p>Convert the backend model object object to UniqueModel object.</p>
</div>
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-toUniqueModelArray">toUniqueModelArray</a></span></span><span data-ice="signature">(backendModelObjectArray: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span>): <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span></span>
        </p>
      </div>
      <div>
        
        
        <div data-ice="description"><p>Convert the Array of backend model objects to Array of UniqueModel objects.</p>
</div>
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-update">update</a></span></span><span data-ice="signature">(condition: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>, doc: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>, options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>): <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span></span>
        </p>
      </div>
      <div>
        
        
        <div data-ice="description"><p>Update the objects match some conditions.</p>
</div>
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-updateAsync">updateAsync</a></span></span><span data-ice="signature">(condition: <span>*</span>, doc: <span>*</span>, callback: <span>*</span>)</span>
        </p>
      </div>
      <div>
        
        
        
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-updateOne">updateOne</a></span></span><span data-ice="signature">(condition: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>, doc: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>, options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>): <span>model/base/Model</span></span>
        </p>
      </div>
      <div>
        
        
        <div data-ice="description"><p>Update only one object match some conditions.</p>
</div>
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
<tr data-ice="target">
    <td>
      <span class="access" data-ice="access">public</span>
      
      
      
      <span class="override" data-ice="override"></span>
    </td>
    <td>
      <div>
        <p>
           <span data-ice="name"><span><a href="class/lib/backend/base.js~Dao.html#instance-method-updateOneAsync">updateOneAsync</a></span></span><span data-ice="signature">(condition: <span>*</span>, doc: <span>*</span>, callback: <span>*</span>)</span>
        </p>
      </div>
      <div>
        
        
        
      </div>
    </td>
    <td>
      
      
    </td>
  </tr>
</tbody>
</table>
</div>





<div data-ice="constructorDetails"><h2 data-ice="title">Public Constructors</h2>

<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-constructor-constructor">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">constructor</span><span data-ice="signature">(session: <span>backend/base/Session</span>)</span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber24">source</a></span></span>
    </span>
  </h3>

  
  
  
  <div data-ice="description"><p>The constructor of Dao class</p>
</div>

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">session</td>
      <td data-ice="type"><span>backend/base/Session</span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The backend session object.</p>
</td>
    </tr>
</tbody>
  </table>
</div>
</div>

  

  

  

  

  

  

  
  
</div>
</div>
<div data-ice="memberDetails"><h2 data-ice="title">Public Members</h2>

<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-member-session">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">session</span><span data-ice="signature">: <span>*</span></span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber25">source</a></span></span>
    </span>
  </h3>

  
  
  
  

  

  <div data-ice="properties">
</div>

  

  

  

  

  

  

  
  
</div>
</div>
<div data-ice="methodDetails"><h2 data-ice="title">Public Methods</h2>

<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-create">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">create</span><span data-ice="signature">(uniqueModelObject: <span>model/base/Model</span>): <span>model/base/Model</span></span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber164">source</a></span></span>
    </span>
  </h3>

  
  
  
  <div data-ice="description"><p>Create the UniqueModel object and persist it through backend.
It will call the asyncCreate method by using execute method.</p>
</div>

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">uniqueModelObject</td>
      <td data-ice="type"><span>model/base/Model</span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The UniqueModel object to create.</p>
</td>
    </tr>
</tbody>
  </table>
</div>
</div>

  <div class="return-params" data-ice="returnParams">
    <h4>Return:</h4>
    <table>
      <tr>
        <td class="return-type" data-ice="returnType"><span>model/base/Model</span></td>
        <td class="return-desc" data-ice="returnDescription"><p>The created UniqueModel object.</p>
</td>
      </tr>
    </table>
    <div data-ice="returnProperties">
</div>
  </div>

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-createAsync">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">createAsync</span><span data-ice="signature">(backendModel: <span>*</span>, callback: <span>*</span>)</span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber320">source</a></span></span>
    </span>
  </h3>

  
  
  
  

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">backendModel</td>
      <td data-ice="type"><span>*</span></td>
      <td data-ice="appendix"></td>
      <td data-ice="description"></td>
    </tr>
<tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">callback</td>
      <td data-ice="type"><span>*</span></td>
      <td data-ice="appendix"></td>
      <td data-ice="description"></td>
    </tr>
</tbody>
  </table>
</div>
</div>

  

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-execute">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">execute</span><span data-ice="signature">(operation: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></span>): <span>*</span></span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber128">source</a></span></span>
    </span>
  </h3>

  
  
  
  <div data-ice="description"><p>Execute the asynchronous operation of backend model object.
It use Fibers to convert asynchronous to synchronous operation.
If the asynchronous pass a error, then this function will throw exception.</p>
</div>

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">operation</td>
      <td data-ice="type"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String">String</a></span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The operation to execute.</p>
</td>
    </tr>
</tbody>
  </table>
</div>
</div>

  <div class="return-params" data-ice="returnParams">
    <h4>Return:</h4>
    <table>
      <tr>
        <td class="return-type" data-ice="returnType"><span>*</span></td>
        <td class="return-desc" data-ice="returnDescription"><p>The operation result.</p>
</td>
      </tr>
    </table>
    <div data-ice="returnProperties">
</div>
  </div>

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-find">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">find</span><span data-ice="signature">(condition: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>): <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span></span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber219">source</a></span></span>
    </span>
  </h3>

  
  
  
  <div data-ice="description"><p>Find the objects by condition.
If the field of object is another object, it will only get the id of object,
and the other fields will be loaded when you first access the object.</p>
</div>

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">condition</td>
      <td data-ice="type"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The query condition</p>
</td>
    </tr>
</tbody>
  </table>
</div>
</div>

  <div class="return-params" data-ice="returnParams">
    <h4>Return:</h4>
    <table>
      <tr>
        <td class="return-type" data-ice="returnType"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span></td>
        <td class="return-desc" data-ice="returnDescription"><p>The Array of UniqueModel objects that match conditions.</p>
</td>
      </tr>
    </table>
    <div data-ice="returnProperties">
</div>
  </div>

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-findAsync">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">findAsync</span><span data-ice="signature">(condition: <span>*</span>, callback: <span>*</span>)</span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber334">source</a></span></span>
    </span>
  </h3>

  
  
  
  

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">condition</td>
      <td data-ice="type"><span>*</span></td>
      <td data-ice="appendix"></td>
      <td data-ice="description"></td>
    </tr>
<tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">callback</td>
      <td data-ice="type"><span>*</span></td>
      <td data-ice="appendix"></td>
      <td data-ice="description"></td>
    </tr>
</tbody>
  </table>
</div>
</div>

  

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-findOne">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">findOne</span><span data-ice="signature">(condition: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>): <span>model/base/Model</span></span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber241">source</a></span></span>
    </span>
  </h3>

  
  
  
  <div data-ice="description"><p>Find one object by condition.
If the field of object is another object, it will only get the id of object,
and the other fields will be loaded when you first access the object.</p>
</div>

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">condition</td>
      <td data-ice="type"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The query condition</p>
</td>
    </tr>
</tbody>
  </table>
</div>
</div>

  <div class="return-params" data-ice="returnParams">
    <h4>Return:</h4>
    <table>
      <tr>
        <td class="return-type" data-ice="returnType"><span>model/base/Model</span></td>
        <td class="return-desc" data-ice="returnDescription"><p>The UniqueModel object that match conditions.</p>
</td>
      </tr>
    </table>
    <div data-ice="returnProperties">
</div>
  </div>

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-findOneAsync">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">findOneAsync</span><span data-ice="signature">(condition: <span>*</span>, callback: <span>*</span>)</span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber339">source</a></span></span>
    </span>
  </h3>

  
  
  
  

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">condition</td>
      <td data-ice="type"><span>*</span></td>
      <td data-ice="appendix"></td>
      <td data-ice="description"></td>
    </tr>
<tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">callback</td>
      <td data-ice="type"><span>*</span></td>
      <td data-ice="appendix"></td>
      <td data-ice="description"></td>
    </tr>
</tbody>
  </table>
</div>
</div>

  

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-getObjectId">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">getObjectId</span><span data-ice="signature">(backendModelObject: <span>*</span>): <span>*</span></span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber329">source</a></span></span>
    </span>
  </h3>

  
  
  
  

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">backendModelObject</td>
      <td data-ice="type"><span>*</span></td>
      <td data-ice="appendix"></td>
      <td data-ice="description"></td>
    </tr>
</tbody>
  </table>
</div>
</div>

  <div class="return-params" data-ice="returnParams">
    <h4>Return:</h4>
    <table>
      <tr>
        <td class="return-type" data-ice="returnType"><span>*</span></td>
        
      </tr>
    </table>
    <div data-ice="returnProperties">
</div>
  </div>

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-getObjectIdKey">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">getObjectIdKey</span><span data-ice="signature">(): <span>*</span></span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber325">source</a></span></span>
    </span>
  </h3>

  
  
  
  

  

  <div data-ice="properties">
</div>

  <div class="return-params" data-ice="returnParams">
    <h4>Return:</h4>
    <table>
      <tr>
        <td class="return-type" data-ice="returnType"><span>*</span></td>
        
      </tr>
    </table>
    <div data-ice="returnProperties">
</div>
  </div>

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-refresh">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">refresh</span><span data-ice="signature">(uniqueModelObject: <span>model/base/Model</span>): <span>model/base/Model</span></span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber189">source</a></span></span>
    </span>
  </h3>

  
  
  
  <div data-ice="description"><p>Refresh the persisted UniqueModel object.
It will load the UniqueModel object from backend session according to the id of object.
It will call the findOne method to get the data.</p>
</div>

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">uniqueModelObject</td>
      <td data-ice="type"><span>model/base/Model</span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The UniqueModel object to refresh.</p>
</td>
    </tr>
</tbody>
  </table>
</div>
</div>

  <div class="return-params" data-ice="returnParams">
    <h4>Return:</h4>
    <table>
      <tr>
        <td class="return-type" data-ice="returnType"><span>model/base/Model</span></td>
        <td class="return-desc" data-ice="returnDescription"><p>The refreshed UniqueModel object.</p>
</td>
      </tr>
    </table>
    <div data-ice="returnProperties">
</div>
  </div>

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-remove">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">remove</span><span data-ice="signature">(condition: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>): <span>*</span></span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber305">source</a></span></span>
    </span>
  </h3>

  
  
  
  <div data-ice="description"><p>Remove some objects.
If the argument is an UniqueModel object, the method will remove this object from persistent session only.
If the argument is an condition object, the method will remove all objects match conditions.</p>
</div>

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">condition</td>
      <td data-ice="type"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The UniqueModel object or condition object.</p>
</td>
    </tr>
</tbody>
  </table>
</div>
</div>

  <div class="return-params" data-ice="returnParams">
    <h4>Return:</h4>
    <table>
      <tr>
        <td class="return-type" data-ice="returnType"><span>*</span></td>
        
      </tr>
    </table>
    <div data-ice="returnProperties">
</div>
  </div>

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-removeAsync">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">removeAsync</span><span data-ice="signature">(condition: <span>*</span>, callback: <span>*</span>)</span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber354">source</a></span></span>
    </span>
  </h3>

  
  
  
  

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">condition</td>
      <td data-ice="type"><span>*</span></td>
      <td data-ice="appendix"></td>
      <td data-ice="description"></td>
    </tr>
<tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">callback</td>
      <td data-ice="type"><span>*</span></td>
      <td data-ice="appendix"></td>
      <td data-ice="description"></td>
    </tr>
</tbody>
  </table>
</div>
</div>

  

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-toBackendModel">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">toBackendModel</span><span data-ice="signature">(uniqueModelObject: <span>model/base/Model</span>): <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber37">source</a></span></span>
    </span>
  </h3>

  
  
  
  <div data-ice="description"><p>Convert the UniqueModel object to BackendModel object.</p>
</div>

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">uniqueModelObject</td>
      <td data-ice="type"><span>model/base/Model</span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The UniqueModel object to convert.</p>
</td>
    </tr>
</tbody>
  </table>
</div>
</div>

  <div class="return-params" data-ice="returnParams">
    <h4>Return:</h4>
    <table>
      <tr>
        <td class="return-type" data-ice="returnType"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></td>
        <td class="return-desc" data-ice="returnDescription"><p>The backend model object corresponding to the UniqueModel object.</p>
</td>
      </tr>
    </table>
    <div data-ice="returnProperties">
</div>
  </div>

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-toUniqueModel">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">toUniqueModel</span><span data-ice="signature">(backendModelObject: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>, uniqueModelObject: <span>model/base/Model</span>): <span>model/base/Model</span></span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber72">source</a></span></span>
    </span>
  </h3>

  
  
  
  <div data-ice="description"><p>Convert the backend model object object to UniqueModel object.</p>
</div>

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">backendModelObject</td>
      <td data-ice="type"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The backend model object object to convert.</p>
</td>
    </tr>
<tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">uniqueModelObject</td>
      <td data-ice="type"><span>model/base/Model</span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The UniqueModel object to store the converted fields.</p>
</td>
    </tr>
</tbody>
  </table>
</div>
</div>

  <div class="return-params" data-ice="returnParams">
    <h4>Return:</h4>
    <table>
      <tr>
        <td class="return-type" data-ice="returnType"><span>model/base/Model</span></td>
        <td class="return-desc" data-ice="returnDescription"><p>The UniqueModel object corresponding to the backend model object.</p>
</td>
      </tr>
    </table>
    <div data-ice="returnProperties">
</div>
  </div>

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-toUniqueModelArray">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">toUniqueModelArray</span><span data-ice="signature">(backendModelObjectArray: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span>): <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span></span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber108">source</a></span></span>
    </span>
  </h3>

  
  
  
  <div data-ice="description"><p>Convert the Array of backend model objects to Array of UniqueModel objects.</p>
</div>

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">backendModelObjectArray</td>
      <td data-ice="type"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The Array of backend model objects object to convert.</p>
</td>
    </tr>
</tbody>
  </table>
</div>
</div>

  <div class="return-params" data-ice="returnParams">
    <h4>Return:</h4>
    <table>
      <tr>
        <td class="return-type" data-ice="returnType"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span></td>
        <td class="return-desc" data-ice="returnDescription"><p>The Array of UniqueModels  object corresponding to the Array of backend model objects.</p>
</td>
      </tr>
    </table>
    <div data-ice="returnProperties">
</div>
  </div>

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-update">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">update</span><span data-ice="signature">(condition: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>, doc: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>, options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>): <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span></span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber268">source</a></span></span>
    </span>
  </h3>

  
  
  
  <div data-ice="description"><p>Update the objects match some conditions.
The update operation will be performed according to the argument doc.</p>
</div>

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">condition</td>
      <td data-ice="type"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The query condition</p>
</td>
    </tr>
<tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">doc</td>
      <td data-ice="type"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The update actions</p>
</td>
    </tr>
<tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">options</td>
      <td data-ice="type"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The update options</p>
</td>
    </tr>
<tr data-ice="property" data-depth="1">
      <td data-ice="name" data-depth="1">options.multi</td>
      <td data-ice="type"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>Update multiple objects if it is true, or only one object will be updated.</p>
</td>
    </tr>
</tbody>
  </table>
</div>
</div>

  <div class="return-params" data-ice="returnParams">
    <h4>Return:</h4>
    <table>
      <tr>
        <td class="return-type" data-ice="returnType"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array">Array</a></span></td>
        <td class="return-desc" data-ice="returnDescription"><p>The Array of updated UniqueModel objects that match conditions.</p>
</td>
      </tr>
    </table>
    <div data-ice="returnProperties">
</div>
  </div>

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-updateAsync">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">updateAsync</span><span data-ice="signature">(condition: <span>*</span>, doc: <span>*</span>, callback: <span>*</span>)</span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber344">source</a></span></span>
    </span>
  </h3>

  
  
  
  

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">condition</td>
      <td data-ice="type"><span>*</span></td>
      <td data-ice="appendix"></td>
      <td data-ice="description"></td>
    </tr>
<tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">doc</td>
      <td data-ice="type"><span>*</span></td>
      <td data-ice="appendix"></td>
      <td data-ice="description"></td>
    </tr>
<tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">callback</td>
      <td data-ice="type"><span>*</span></td>
      <td data-ice="appendix"></td>
      <td data-ice="description"></td>
    </tr>
</tbody>
  </table>
</div>
</div>

  

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-updateOne">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">updateOne</span><span data-ice="signature">(condition: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>, doc: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>, options: <span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span>): <span>model/base/Model</span></span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber286">source</a></span></span>
    </span>
  </h3>

  
  
  
  <div data-ice="description"><p>Update only one object match some conditions.
The update operation will be performed according to the argument doc.</p>
</div>

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">condition</td>
      <td data-ice="type"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The query condition</p>
</td>
    </tr>
<tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">doc</td>
      <td data-ice="type"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The update actions</p>
</td>
    </tr>
<tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">options</td>
      <td data-ice="type"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object">Object</a></span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>The update options</p>
</td>
    </tr>
<tr data-ice="property" data-depth="1">
      <td data-ice="name" data-depth="1">options.new</td>
      <td data-ice="type"><span><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean">Boolean</a></span></td>
      <td data-ice="appendix"><ul><li>optional</li></ul></td>
      <td data-ice="description"><p>updateOne will return updated object when this argument is true.
                                 Or it will return the object before update.</p>
</td>
    </tr>
</tbody>
  </table>
</div>
</div>

  <div class="return-params" data-ice="returnParams">
    <h4>Return:</h4>
    <table>
      <tr>
        <td class="return-type" data-ice="returnType"><span>model/base/Model</span></td>
        <td class="return-desc" data-ice="returnDescription"><p>The updated UniqueModel object that match conditions.</p>
</td>
      </tr>
    </table>
    <div data-ice="returnProperties">
</div>
  </div>

  

  

  

  

  

  
  
</div>
<div class="detail" data-ice="detail">
  <h3 data-ice="anchor" id="instance-method-updateOneAsync">
    <span class="access" data-ice="access">public</span>
    
    
    
    
    <span data-ice="name">updateOneAsync</span><span data-ice="signature">(condition: <span>*</span>, doc: <span>*</span>, callback: <span>*</span>)</span>
    <span class="right-info">
      
      
      <span data-ice="source"><span><a href="file/lib/backend/base.js.html#lineNumber349">source</a></span></span>
    </span>
  </h3>

  
  
  
  

  

  <div data-ice="properties"><div data-ice="properties">
  <h4 data-ice="title">Params:</h4>
  <table class="params">
    <thead>
    <tr><td>Name</td><td>Type</td><td>Attribute</td><td>Description</td></tr>
    </thead>
    <tbody>
    
    <tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">condition</td>
      <td data-ice="type"><span>*</span></td>
      <td data-ice="appendix"></td>
      <td data-ice="description"></td>
    </tr>
<tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">doc</td>
      <td data-ice="type"><span>*</span></td>
      <td data-ice="appendix"></td>
      <td data-ice="description"></td>
    </tr>
<tr data-ice="property" data-depth="0">
      <td data-ice="name" data-depth="0">callback</td>
      <td data-ice="type"><span>*</span></td>
      <td data-ice="appendix"></td>
      <td data-ice="description"></td>
    </tr>
</tbody>
  </table>
</div>
</div>

  

  

  

  

  

  

  
  
</div>
</div>
</div>

<footer class="footer">
  Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(0.4.3)</span></a>
</footer>

<script src="script/search_index.js"></script>
<script src="script/search.js"></script>
<script src="script/pretty-print.js"></script>
<script src="script/inherited-summary.js"></script>
<script src="script/test-summary.js"></script>
<script src="script/inner-link.js"></script>
<script src="script/patch-for-local.js"></script>
</body>
</html>
